package StudySpringBoot2.mapper;

import StudySpringBoot2.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

// 这个注解表示了这是一个mapper的注解类
@Mapper
@Repository
public interface UserMapper {

    List<User> queryUserList();

    User queryUserById(@Param("id") int id);

    void addUser(User user);

    User updateUser(User user);

    void deleteUser(@Param("id") int id);

}